
<h1>Games on {{ week.date.isoformat}}</h1>
<h2>Double check your picks because once they are entered there is no changing them.  After pick submission, you will be able to see the other player's picks.
{% if picks %}
<ul>
  {% for pick in picks %}
  <li>{{pick.game}} {{pick.game.line}} => {{pick.pick}}</li>
  {% endfor %}
</ul>
{% endif %}
<form action="../../../../nba_pool_v2/submit_picks/{{ week.id }}/{{ player_id }}/" method="post">
  {% csrf_token %}
  {% if player_id and game_list and week %}
  <table border="1">
    <tr>
      <td>Away</td>
      <td>Home</td>
    </tr>
    {% for game in game_list %}
    <tr>
      <td> {{game.away}} </td>
      <td> {{game.home}} 
	{% if game.line > 0 %}
	+{{game.line}}
	{% else %}
	{{game.line}}
	{% endif %}
	 </td>
      <td>
	<select name="{{game.id}}" default="---">
	  <option name="---">---</option>
	  <option name="{{game.away}}">{{game.away}}</option>
	  <option name="{{game.home}}">{{game.home}}</option>
	</select>
      </td>
    </tr>
    {% endfor %}
  </table>
  <input type="submit" value="submit"/>
</form>

{% else %}
<p>invalid input</p>
{% endif %}
  
